package com.bj58.groupbuy.action.service;

import java.util.List;

import com.bj58.groupbuy.action.model.Role;
import com.bj58.groupbuy.wf.page.Paginate;

public interface RoleManagerService{

	/**通过角色名查询Role信息
	 * @param userName
	 * @return
	 * @throws Exception
	 */
	public Role getRoleByName (String userName) throws Exception;
	
	/**通过角色id查询Role信息
	 * @param userName
	 * @return
	 * @throws Exception
	 */
	public Role getRoleById (int roleid) throws Exception;
	
	/**查询所有状态正常使用的角色
	 * @param userName
	 * @return
	 * @throws Exception
	 */
	public List<Role> getAllRoles () throws Exception;
	
	/**分页查询Role列表
	 * @param pageIndex
	 * @param pageSize
	 * @param where
	 * @return
	 * @throws Exception
	 */
	public Paginate<Role> getRoleByPage (int pageIndex, int pageSize ,String where) throws Exception;
	
	public boolean saveRole(Role r)throws Exception;
	
	public boolean updateRole(Role role)throws Exception;
}
